package com.zyj.myapplication.Model;

import com.zyj.myapplication.Service.MyService;

import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by Administrator on 2017/10/9.
 */

public class MyModel {
    private Retrofit retrofit;
    private MyService myService;

    public MyModel() {
        retrofit = new Retrofit
                .Builder()
                .baseUrl(Constant.BASE_URL)
                .addConverterFactory(GsonConverterFactory.create())
                .build();
    }

    private void service() {
        myService = retrofit.create(MyService.class);
    }

    public Call getuserid() {
        service();
        return myService.getuserid();
    }

}
